<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>新芽后台管理系统</title>
    <link rel="shortcut icon" href="/asserts/images/favicon.ico" type="image/x-icon">
    <link href="http://dd.ddandang.top/css/bootstrap.min.css" rel="stylesheet">
    <link href="/asserts/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/asserts/css/style.min.css" rel="stylesheet">
    <link href="/asserts/css/default.css" rel="stylesheet">
</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--引入leftNavigation左边导航栏-->
        <div th:include="~{common/module::leftNavigation(flag='空',active='空')}"></div>

        <!--头部信息-->
        <div th:include="~{common/module::headerInformation(headerMessage=' 个人信息')}"></div>

        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">
                                <img class="img-avatar img-avatar-120 image" id="img" th:src="${session.img}" alt="">
                                <!-- 按钮触发模态框 -->
                                <button class="btn btn-primary btn-lg" th:id="btn" data-toggle="modal" data-target="#myModal">更换头像</button>
                                <!-- 模态框（Modal） -->
                                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                    <div class="modal-dialog">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                                    &times;
                                                </button>
                                                <h4 class="modal-title" id="myModalLabel">
                                                    上传头像
                                                </h4>
                                                <span class="label label-info" style="font-size: small">支持jpeg,jpg,png格式2M以内的图片</span>
                                            </div>
                                            <div class="modal-body">
                                                <div class="alert alert-warning" style="display: none">
                                                    <a href="#" class="close" data-dismiss="alert">
                                                        &times;
                                                    </a>
                                                    <strong>警告！</strong>文件大于2M
                                                </div>
                                                <img class="img-avatar img-avatar-120 image" id="image" th:src="${session.img}" alt="">
                                                <a href="javascript:;" class="file">选择文件
                                                    <input type="file" name="" id="" class="input_file" accept="image/jpeg,image/png,image/jpg">
                                                </a>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                                </button>
                                                <button type="button" class="btn btn-primary" disabled="disabled" th:id="change">
                                                    更换头像
                                                </button>
                                            </div>
                                        </div><!-- /.modal-content -->
                                    </div><!-- /.modal -->
                                </div>

                                <!--密码修改-->
                                <div class="container-fluid">
                                    <div class="row">
                                        <div class="col-md-6">
                                                <div class="form-group">
                                                    <label for="account">账号</label>
                                                    <input type="text" class="form-control" id="account" disabled="disabled" th:value="${session.admin.account}">
                                                </div>
                                                <div class="form-group">
                                                    <label for="oldPassword">旧密码</label>
                                                    <input type="password" class="form-control" id="oldPassword" placeholder="请输入原始密码：">
                                                    <div th:id="mes3" class="invalid-feedback">
                                                        原始密码不能为空且密码必须在6~18位之间！
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label for="newPassword">新密码</label>
                                                    <input id="newPassword" class="form-control" type="password" name="newPassword" placeholder="请输入新密码"   >
                                                    <div th:id="mes1" class="invalid-feedback">
                                                        密码必须在6~18位之间!
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label for="repeatPassword">确认密码</label>
                                                    <input type="password" class="form-control" id="repeatPassword" name="repeatPassword" placeholder="请确认密码：">
                                                    <div th:id="mes2" class="invalid-feedback">
                                                        两次密码必须相同 且在6~18位之间!
                                                    </div>
                                                </div>
                                                <div class="alert alert-danger" th:id="error" role="alert" style="display: none">原始密码错误，请确认后重新输入！</div>
                                                <button type="button" th:id="change_btn" class="btn btn-info">修改密码</button>
                                        </div>
                                    </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>

            </div>
        </main>
    </div>
</div>

<script type="text/javascript" src="http://dd.ddandang.top/js/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="/asserts/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/asserts/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/asserts/js/index.min.js"></script>
<script type="text/javascript" src="/asserts/js/default.js"></script>
<script type="text/javascript" src="/asserts/js/admin/information.js"></script>


</body>
</html>